<?php

namespace App\Models\App;

use App\Traits\UuidTrait;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Tymon\JWTAuth\Contracts\JWTSubject;

class AppUser extends Authenticatable implements JWTSubject
{
    use SoftDeletes, UuidTrait;

    const TABLE_NAME = 'app_users';
    protected $table = self::TABLE_NAME;

    public $casts = [
        'created_at' => 'string', // datetime:Y-m-d H:i:s
    ];

    protected $hidden = ['updated_at', 'deleted_at'];

    public function getJWTIdentifier()
    {
        return $this->getKey();
    }

    public function getJWTCustomClaims(): array
    {
        return [];
    }
}
